﻿using com.guojin.core.io;
using com.guojin.core.io.message;

namespace com.guojin.mj.net.message.login
{
    //创建房间结果
    public class CreateRoomRet : Message
    {
        public static int TYPE = 7;
        public static int ID = 1;

        public bool result { get; set; }
        public string roomID { get; set; }

        public void decode(Input _in)
        {
            result = _in.readBoolean();
            roomID = _in.readString();
        }

        public void encode(Output _out)
        {
            _out.writeBoolean(result);
            _out.writeString(roomID);
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return "CreateRoomRet [roomType=" +  " =" + result + ",roomCheckId=" + roomID + ", ]";
        }
    }
}